#ifndef MJSTONE_H
#define MJSTONE_H
#include <iostream>
#include<vector>
#include <map>
#include<time.h>
#include <QPixmap>

using namespace std;


const int Wan1  =  1;
const int Wan2  =  2;
const int Wan3  =  3;
const int Wan4  =  4;
const int Wan5  =  5;
const int Wan6  =  6;
const int Wan7  =  7;
const int Wan8  =  8;
const int Wan9  =  9;
const int Tiao1 = 11;
const int Tiao2 = 12;
const int Tiao3 = 13;
const int Tiao4 = 14;
const int Tiao5 = 15;
const int Tiao6 = 16;
const int Tiao7 = 17;
const int Tiao8 = 18;
const int Tiao9 = 19;
const int Tong1 = 21;
const int Tong2 = 22;
const int Tong3 = 23;
const int Tong4 = 24;
const int Tong5 = 25;
const int Tong6 = 26;
const int Tong7 = 27;
const int Tong8 = 28;
const int Tong9 = 29;
const int Dong  = 40;
const int Nan   = 50;
const int Xi    = 60;
const int Bei   = 70;
const int Zhong = 80;
const int Bai   = 90;
const int Fa    =100;


class MJStone
{
public:
    MJStone();

    static void init();
    static QPixmap getPicMapByNum(int i);
    static QString stoneToName(int num);
    static bool wait(vector<int> &vec);
    static bool win(vector<int> &vec);
    static bool helper(map<int, int>& Map);
    static bool discard(vector<int> &vec);
public:
    static map<int,int> allStone;      //记录所有的 136张麻将
    static vector<int> allKindStone;   //记录34中类型的麻将

//    static map<int,int> handStoneMap;  //手牌字典
    static vector<int> handStoneVec;   //手牌数组

    static vector<int> waitStoneVec;//听牌数组

    static int disCard;
};

#endif // MJSTONE_H
